/*
* Copyright (c) 2020 - 2024 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/***********************************************************************************************************************
 * Includes
 **********************************************************************************************************************/
#include "r_rsip_primitive.h"
#include "r_rsip_util.h"

/***********************************************************************************************************************
 * Global variables
 **********************************************************************************************************************/

uint32_t         S_RAM[RSIP_PRV_WORD_SIZE_S_RAM];
uint32_t         S_HEAP[RSIP_PRV_WORD_SIZE_S_HEAP];
uint32_t         S_INST[RSIP_PRV_WORD_SIZE_S_INST];
uint32_t const * S_INST2;

uint32_t const s_flash[] =
{
    BSWAP_32BIG_C(0xb17c8323U), BSWAP_32BIG_C(0xf3b9c102U), BSWAP_32BIG_C(0xc726c1d9U), BSWAP_32BIG_C(0x6024b141U),
    BSWAP_32BIG_C(0x33d4e723U), BSWAP_32BIG_C(0x990054acU), BSWAP_32BIG_C(0x92165960U), BSWAP_32BIG_C(0x5ec4f0b1U),
    BSWAP_32BIG_C(0xae29e919U), BSWAP_32BIG_C(0xf39104d3U), BSWAP_32BIG_C(0x60bb32a5U), BSWAP_32BIG_C(0x32ca4b83U),
    BSWAP_32BIG_C(0xfd569ae3U), BSWAP_32BIG_C(0x2068a454U), BSWAP_32BIG_C(0x61bdaba7U), BSWAP_32BIG_C(0x82fa8d18U),
    BSWAP_32BIG_C(0x9ad76adbU), BSWAP_32BIG_C(0xc8cc2979U), BSWAP_32BIG_C(0x2f5c56b0U), BSWAP_32BIG_C(0xe4b21c61U),
    BSWAP_32BIG_C(0x5c3a8f38U), BSWAP_32BIG_C(0xa7c52b44U), BSWAP_32BIG_C(0xa2491c5cU), BSWAP_32BIG_C(0xc76784dcU),
    BSWAP_32BIG_C(0xee8b3ccaU), BSWAP_32BIG_C(0xf9b89f3fU), BSWAP_32BIG_C(0x48eb6a5eU), BSWAP_32BIG_C(0x60f0f36fU),
    BSWAP_32BIG_C(0xa1a9fcdfU), BSWAP_32BIG_C(0x054f1995U), BSWAP_32BIG_C(0x0add8859U), BSWAP_32BIG_C(0x957aef47U),
    BSWAP_32BIG_C(0xb4ff5c6aU), BSWAP_32BIG_C(0xa9740a87U), BSWAP_32BIG_C(0xf5b8e042U), BSWAP_32BIG_C(0x52c4603bU),
    BSWAP_32BIG_C(0xe462d77dU), BSWAP_32BIG_C(0xab857a60U), BSWAP_32BIG_C(0xc53e2c4dU), BSWAP_32BIG_C(0xab5412ebU),
    BSWAP_32BIG_C(0x375feed8U), BSWAP_32BIG_C(0xd5ba0544U), BSWAP_32BIG_C(0x2971e091U), BSWAP_32BIG_C(0xdb74cdffU),
    BSWAP_32BIG_C(0x2fcd1db5U), BSWAP_32BIG_C(0xcd39e764U), BSWAP_32BIG_C(0x4a056865U), BSWAP_32BIG_C(0x642bf6dbU),
    BSWAP_32BIG_C(0x0fbadb25U), BSWAP_32BIG_C(0x7400f917U), BSWAP_32BIG_C(0x7a3cd38fU), BSWAP_32BIG_C(0x95ef6244U),
    BSWAP_32BIG_C(0x1dc24bd5U), BSWAP_32BIG_C(0x0f7509beU), BSWAP_32BIG_C(0xc88c0a0fU), BSWAP_32BIG_C(0xc866c1b6U),
    BSWAP_32BIG_C(0xca234540U), BSWAP_32BIG_C(0x177abea3U), BSWAP_32BIG_C(0xfe671545U), BSWAP_32BIG_C(0xb5cd368bU),
    BSWAP_32BIG_C(0x6bfe3edaU), BSWAP_32BIG_C(0x23959447U), BSWAP_32BIG_C(0xc2361c44U), BSWAP_32BIG_C(0x4e492a06U),
    BSWAP_32BIG_C(0xe6f76d4eU), BSWAP_32BIG_C(0x9a348043U), BSWAP_32BIG_C(0x1ab98343U), BSWAP_32BIG_C(0xb4c800f5U),
    BSWAP_32BIG_C(0x260fbb8bU), BSWAP_32BIG_C(0xb208cdc2U), BSWAP_32BIG_C(0xc242e59aU), BSWAP_32BIG_C(0x92b4f312U),
    BSWAP_32BIG_C(0x39f2f8d6U), BSWAP_32BIG_C(0x3848f131U), BSWAP_32BIG_C(0x7d31a8e7U), BSWAP_32BIG_C(0x6c673edeU),
    BSWAP_32BIG_C(0x2949a67cU), BSWAP_32BIG_C(0xbe2e6241U), BSWAP_32BIG_C(0xde7f6e03U), BSWAP_32BIG_C(0xf51716f8U),
    BSWAP_32BIG_C(0x3a435d6bU), BSWAP_32BIG_C(0x0fd59356U), BSWAP_32BIG_C(0xee231d9eU), BSWAP_32BIG_C(0xa4f50517U),
    BSWAP_32BIG_C(0x2bd44a4bU), BSWAP_32BIG_C(0x0d262184U), BSWAP_32BIG_C(0x6f62bf78U), BSWAP_32BIG_C(0x2667167cU),
    BSWAP_32BIG_C(0xfbd367c0U), BSWAP_32BIG_C(0xccdb5695U), BSWAP_32BIG_C(0x7aeff217U), BSWAP_32BIG_C(0x961c584cU),
    BSWAP_32BIG_C(0xacab8fd9U), BSWAP_32BIG_C(0x87424276U), BSWAP_32BIG_C(0x9a780456U), BSWAP_32BIG_C(0x740f5f31U),
    BSWAP_32BIG_C(0x4f7a745cU), BSWAP_32BIG_C(0xf4468832U), BSWAP_32BIG_C(0x44773da3U), BSWAP_32BIG_C(0x8632d833U),
    BSWAP_32BIG_C(0xaacff792U), BSWAP_32BIG_C(0xa20518e7U), BSWAP_32BIG_C(0x74d125b2U), BSWAP_32BIG_C(0xec928f1eU),
    BSWAP_32BIG_C(0xbc9351d6U), BSWAP_32BIG_C(0x6d0088adU), BSWAP_32BIG_C(0x49308b33U), BSWAP_32BIG_C(0x2bc0ef7bU),
    BSWAP_32BIG_C(0xc09917c0U), BSWAP_32BIG_C(0xabe7d973U), BSWAP_32BIG_C(0x2b7fc0bdU), BSWAP_32BIG_C(0x8e6b5962U),
    BSWAP_32BIG_C(0xdd19a3c5U), BSWAP_32BIG_C(0x68e0608cU), BSWAP_32BIG_C(0x480f3328U), BSWAP_32BIG_C(0x34a6ed9dU),
    BSWAP_32BIG_C(0x82815889U), BSWAP_32BIG_C(0x9ceb4868U), BSWAP_32BIG_C(0x81ec4344U), BSWAP_32BIG_C(0xc49a0ff1U),
    BSWAP_32BIG_C(0xedd9782dU), BSWAP_32BIG_C(0xb8a22526U), BSWAP_32BIG_C(0x22d32788U), BSWAP_32BIG_C(0x164b76eeU),
    BSWAP_32BIG_C(0x274e3d82U), BSWAP_32BIG_C(0x9d7dc33fU), BSWAP_32BIG_C(0x569bc3a6U), BSWAP_32BIG_C(0x88a8c940U),
    BSWAP_32BIG_C(0xc66e224fU), BSWAP_32BIG_C(0x2b30495fU), BSWAP_32BIG_C(0x4e1bd989U), BSWAP_32BIG_C(0x0f0a7166U),
    BSWAP_32BIG_C(0x61fab0b0U), BSWAP_32BIG_C(0x91905385U), BSWAP_32BIG_C(0xf0b13073U), BSWAP_32BIG_C(0xfc5e637bU),
    BSWAP_32BIG_C(0xe528b52eU), BSWAP_32BIG_C(0x5b6aedddU), BSWAP_32BIG_C(0x509de7ebU), BSWAP_32BIG_C(0xbc6e34b3U),
    BSWAP_32BIG_C(0xa11bdedbU), BSWAP_32BIG_C(0x77eebd9dU), BSWAP_32BIG_C(0xa5a12aafU), BSWAP_32BIG_C(0xe711b6a3U),
    BSWAP_32BIG_C(0x7f891329U), BSWAP_32BIG_C(0x1c83482fU), BSWAP_32BIG_C(0xa36a1709U), BSWAP_32BIG_C(0x9adf3292U),
    BSWAP_32BIG_C(0xe283e1dfU), BSWAP_32BIG_C(0x655662eaU), BSWAP_32BIG_C(0xfacb7412U), BSWAP_32BIG_C(0x44f1b7d4U),
    BSWAP_32BIG_C(0xe0293a58U), BSWAP_32BIG_C(0xf6c86a94U), BSWAP_32BIG_C(0xed2ba305U), BSWAP_32BIG_C(0x2317499fU),
    BSWAP_32BIG_C(0x42bfc602U), BSWAP_32BIG_C(0x12cfab57U), BSWAP_32BIG_C(0xfc3693f2U), BSWAP_32BIG_C(0xf2c8dc0bU),
    BSWAP_32BIG_C(0xcff041a4U), BSWAP_32BIG_C(0xe91a8c43U), BSWAP_32BIG_C(0x9adb3aa7U), BSWAP_32BIG_C(0x6e3091c4U),
    BSWAP_32BIG_C(0xe275af34U), BSWAP_32BIG_C(0xd2adb6f6U), BSWAP_32BIG_C(0x8ad110faU), BSWAP_32BIG_C(0xbd43b711U),
    BSWAP_32BIG_C(0x88387756U), BSWAP_32BIG_C(0xab38093bU), BSWAP_32BIG_C(0x3da1cd71U), BSWAP_32BIG_C(0xed937f03U),
    BSWAP_32BIG_C(0xc26fef83U), BSWAP_32BIG_C(0xbe4764e1U), BSWAP_32BIG_C(0x75691c2cU), BSWAP_32BIG_C(0x7acc7dd1U),
    BSWAP_32BIG_C(0xa7e7587eU), BSWAP_32BIG_C(0x613d23ffU), BSWAP_32BIG_C(0x84343479U), BSWAP_32BIG_C(0xb5526e35U),
    BSWAP_32BIG_C(0x3ee6f3faU), BSWAP_32BIG_C(0xd1f1465dU), BSWAP_32BIG_C(0xdaf92cb8U), BSWAP_32BIG_C(0xa0a5de7eU),
    BSWAP_32BIG_C(0xe19a59eeU), BSWAP_32BIG_C(0xdab755c3U), BSWAP_32BIG_C(0xeb968420U), BSWAP_32BIG_C(0x24fcfc65U),
    BSWAP_32BIG_C(0x3be44540U), BSWAP_32BIG_C(0x62f9f5b8U), BSWAP_32BIG_C(0xfbd7df9eU), BSWAP_32BIG_C(0xb7734182U),
    BSWAP_32BIG_C(0xfe247fdbU), BSWAP_32BIG_C(0xa567a87bU), BSWAP_32BIG_C(0xea9c8f8bU), BSWAP_32BIG_C(0x6f334f3dU),
    BSWAP_32BIG_C(0xad246441U), BSWAP_32BIG_C(0x53a44963U), BSWAP_32BIG_C(0x913f60f7U), BSWAP_32BIG_C(0x95c81a4cU),
    BSWAP_32BIG_C(0x4f83a91cU), BSWAP_32BIG_C(0xcde68f53U), BSWAP_32BIG_C(0xd22e2be3U), BSWAP_32BIG_C(0x4defca1cU),
    BSWAP_32BIG_C(0x5330b726U), BSWAP_32BIG_C(0x1411261eU), BSWAP_32BIG_C(0xcb5742b3U), BSWAP_32BIG_C(0xb2128f76U),
    BSWAP_32BIG_C(0x6d329c00U), BSWAP_32BIG_C(0x8db22856U), BSWAP_32BIG_C(0x032b18f4U), BSWAP_32BIG_C(0xece66ddbU),
    BSWAP_32BIG_C(0xa3889f4cU), BSWAP_32BIG_C(0x348998c5U), BSWAP_32BIG_C(0xf097ee10U), BSWAP_32BIG_C(0x4b1d1ea5U),
    BSWAP_32BIG_C(0x9d322e8cU), BSWAP_32BIG_C(0x0a626997U), BSWAP_32BIG_C(0x9196cd6cU), BSWAP_32BIG_C(0xcea002f6U),
    BSWAP_32BIG_C(0x95f3449cU), BSWAP_32BIG_C(0x08a418c3U), BSWAP_32BIG_C(0xa39e24d2U), BSWAP_32BIG_C(0xcc9f7b18U),
    BSWAP_32BIG_C(0xa38d0c57U), BSWAP_32BIG_C(0xa129d77dU), BSWAP_32BIG_C(0xfa391362U), BSWAP_32BIG_C(0x15d37355U),
    BSWAP_32BIG_C(0x7597a182U), BSWAP_32BIG_C(0xb49397e4U), BSWAP_32BIG_C(0xba0b1caeU), BSWAP_32BIG_C(0xb2a6ffaaU),
    BSWAP_32BIG_C(0x7948702cU), BSWAP_32BIG_C(0xa54704e0U), BSWAP_32BIG_C(0x269adf8dU), BSWAP_32BIG_C(0xe13e9957U),
    BSWAP_32BIG_C(0x0c318efbU), BSWAP_32BIG_C(0xc50173abU), BSWAP_32BIG_C(0x8d3634e9U), BSWAP_32BIG_C(0x19b60defU),
    BSWAP_32BIG_C(0x4055b00aU), BSWAP_32BIG_C(0x488cc461U), BSWAP_32BIG_C(0x654b5f2aU), BSWAP_32BIG_C(0xb0b2f409U),
    BSWAP_32BIG_C(0xd6628097U), BSWAP_32BIG_C(0x7de929a5U), BSWAP_32BIG_C(0x202957e7U), BSWAP_32BIG_C(0x30dd2f4dU),
    BSWAP_32BIG_C(0xf045c1cbU), BSWAP_32BIG_C(0x592438e6U), BSWAP_32BIG_C(0x00d41e17U), BSWAP_32BIG_C(0x8bcff33bU),
    BSWAP_32BIG_C(0x7ea705cbU), BSWAP_32BIG_C(0x351e5947U), BSWAP_32BIG_C(0x4991498eU), BSWAP_32BIG_C(0x065b7e1aU),
    BSWAP_32BIG_C(0xc856de55U), BSWAP_32BIG_C(0x111575c3U), BSWAP_32BIG_C(0xd55aac84U), BSWAP_32BIG_C(0x35eaa19bU),
    BSWAP_32BIG_C(0x261e25d9U), BSWAP_32BIG_C(0xf1cea93bU), BSWAP_32BIG_C(0x21c3b9a3U), BSWAP_32BIG_C(0x8e671e9bU),
    BSWAP_32BIG_C(0x8a2107bfU), BSWAP_32BIG_C(0x2533fcd6U), BSWAP_32BIG_C(0x606b398aU), BSWAP_32BIG_C(0xc9d28102U),
    BSWAP_32BIG_C(0x56cc1fa6U), BSWAP_32BIG_C(0x205bc972U), BSWAP_32BIG_C(0x00f41894U), BSWAP_32BIG_C(0x19d77d5eU),
    BSWAP_32BIG_C(0xfb0c8174U), BSWAP_32BIG_C(0x1c386d8eU), BSWAP_32BIG_C(0xa8be0349U), BSWAP_32BIG_C(0x5b0854bcU),
    BSWAP_32BIG_C(0xfb9d4420U), BSWAP_32BIG_C(0x3c18440cU), BSWAP_32BIG_C(0x106bee83U), BSWAP_32BIG_C(0x24599337U),
    BSWAP_32BIG_C(0x67d9c4ffU), BSWAP_32BIG_C(0x5a4c8fd3U), BSWAP_32BIG_C(0x2bdc4976U), BSWAP_32BIG_C(0xec0a3016U),
    BSWAP_32BIG_C(0xc478494fU), BSWAP_32BIG_C(0xdf13cbb6U), BSWAP_32BIG_C(0x273da867U), BSWAP_32BIG_C(0x500fd590U),
};
